package sample.classes;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.SpinnerAdapter;
import android.widget.TextView;

public class MySpinnerAdapter extends BaseAdapter implements SpinnerAdapter {

    //private List<MyListItem> items; // replace MyListItem with your model object type
    private Context context;

    public MySpinnerAdapter(Context aContext) {
        context = aContext;
        //items = new ArrayList<MyListItem>();
        //items.add(null); // add first dummy item - selection of this will be ignored
        // TODO: add other items;
    }

      
 /*   public int getCount() {
        return items.size();
    }

      
    public Object getItem(int aPosition) {
        return items.get(aPosition);
    }*/

    public long getItemId(int aPosition) {
        return aPosition;
    }

      
    public View getView(int aPosition, View aView, ViewGroup aParent) {
        TextView text = new TextView(context);
        if (aPosition == 0) {
            text.setText("-- Please select --"); // text for first dummy item
        } else {
            //text.setText(items.get(aPosition).toString());
            // or use whatever model attribute you'd like displayed instead of toString()
        }
        return text;
    }


	public int getCount() {
		// TODO Auto-generated method stub
		return 0;
	}


	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}
}